package com.bee2c.pub.home.task.dao;import java.util.List;import javax.persistence.Query;import com.bee2c.pub.home.task.entity.PubTask;import com.bee2c.pub.util.dao.BaseDao;public class PubTaskDaoImpl extends BaseDao<PubTask> {	@SuppressWarnings("unchecked")	public List<PubTask> findWaitToDoTask(String transferType, int size) {		String jpl = "SELECT a FROM PubTask a WHERE taskStatus in ('W','F') AND transferType=:transferType ORDER BY runCount DESC";		Query query = em.createQuery(jpl);		query.setParameter("transferType", transferType);		return query.setMaxResults(size).getResultList();// 仅返回一条记录	}}